//package com.es.www.kyl.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//import org.springframework.security.crypto.password.PasswordEncoder;
//import org.springframework.security.web.SecurityFilterChain;
//
///**
// * @author Estranger
// * @date 2025/7/30
// * description
// */
//@Configuration
//@EnableWebSecurity
//public class SecurityConfig {
//
//	@Bean
//	public PasswordEncoder passwordEncoder() {
//		return new BCryptPasswordEncoder();
//	}
//
////	@Bean
////	public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
////		http
////				.csrf(AbstractHttpConfigurer::disable) // 关闭CSRF保护，因为我们用Token
////				.authorizeHttpRequests(auth -> auth
////						.requestMatchers("/api/admin/login").permitAll() // 明确放行登录接口
////						.anyRequest().authenticated() // 其他接口需要认证（之后由JWT中间件处理）
////				);
////		return http.build();
////	}
//}
